home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / GamePort.mod < prev    next >
Text File  |  1995-06-29  |  2KB  |  75 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: GamePort.mod $
  4.   Description: Interface to gameport.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   $VER: gameport.h 36.1 (5.11.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. <* STANDARD- *>
  24.  
  25. MODULE [2] GamePort;
  26.  
  27. IMPORT e := Exec, s := Sets;
  28.  
  29.  
  30. (*
  31. **      GamePort device command definitions
  32. *)
  33.  
  34.  
  35. CONST
  36.  
  37. (******  GamePort commands ******)
  38.   readEvent     * = e.nonstd+0;
  39.   askCType      * = e.nonstd+1;
  40.   setCType      * = e.nonstd+2;
  41.   askTrigger    * = e.nonstd+3;
  42.   setTrigger    * = e.nonstd+4;
  43.  
  44. (******  GamePort structures ******)
  45.  
  46. (* GamePortTrigger.keys *)
  47.   downKeys     * = 0;
  48.   upKeys       * = 1;
  49.  
  50. TYPE
  51.  
  52.   GamePortTriggerPtr * = POINTER TO GamePortTrigger;
  53.   GamePortTrigger * = RECORD
  54.     keys *    : s.SET16;      (* key transition triggers *)
  55.     timeout * : e.UWORD;      (* time trigger (vertical blank units) *)
  56.     xDelta *  : e.UWORD;      (* X distance trigger *)
  57.     yDelta *  : e.UWORD;      (* Y distance trigger *)
  58.   END; (* GamePortTrigger *)
  59.  
  60. CONST
  61.  
  62. (****** Controller Types ******)
  63.   allocated    * = -1;    (* allocated by another user *)
  64.   noController * = 0;
  65.  
  66.   mouse        * = 1;
  67.   relJoystick  * = 2;
  68.   absJoystick  * = 3;
  69.  
  70.  
  71. (****** Errors ******)
  72.   errSetCType    * = 1;     (* this controller not valid at this time *)
  73.  
  74. END GamePort.
  75.